import { useMutation, useQuery } from "@tanstack/react-query";
import { request } from "../api/request";
import { PROFILE_URL } from "../constants/url";

const profileFn = async (param) => {
  const { data } = await request(
    {
      method: "get",
      url: param.url,
    },
    true
  );
  return {
    data,
  };
};

export default function useProfile() {
  //
  return useMutation(["profile"], profileFn);
}
